package exercise;

import java.lang.management.GarbageCollectorMXBean;

public class A {
    public static void main(String[] args) {

    }

    public static boolean test(String str) {
        if ((str.length() == 18 && str.charAt(0) != '0') && (
                str.charAt(17) == 'x' || str.charAt(17) == 'X')
                || Character.isDigit(str.charAt(17))) {

            for (int i = 0; i < str.length(); i++)
                if (!Character.isDigit(str.charAt(i)))
                    return false;


            return true;
        } else return false;
    }
}
